/******************************************************************************/
/*                                                                            */
/*                       Copyright (c) HANBACK ELECTRONICS                    */
/*                              All rights reserved.                          */
/*                                                                            */
/*                             http://www.hanback.com                         */
/*                                                                            */
/******************************************************************************/

/******************************************************************************/
/*                                                                            */
/*============================================================================*/
/* Permission to use, copy, modify, and distribute this software and its      */
/* documentation are reserved by above authors and Hanback electronics.       */
/* The above copyright notice and authors must be described in this software. */
/*============================================================================*/
/*                                                                            */
/******************************************************************************/

includes Hanback_TreeRouting;

configuration Hanback_TreeRoutingC { 

  provides interface StdControl;
  provides interface AMSend as SendFromAPP;
  provides interface Receive as RecvToAPP;

}implementation{

  components Hanback_TreeRoutingM as RouteM
           , new TimerMilliC()
	   , RandomC
           , ActiveMessageC as MAC
	   , HAL_CC2430ControlC
           , new AMSenderC(AM_TREEMSG) as SendDataC
           , new AMReceiverC(AM_TREEMSG) as RecvDataC
	   , new AMSenderC(AM_BEACON_MSG) as SendBeaconC
           , new AMReceiverC(AM_BEACON_MSG) as RecvBeaconC;
  
  StdControl  = RouteM;
  SendFromAPP = RouteM;
  RecvToAPP = RouteM;

  RouteM.Timer  -> TimerMilliC;

  RouteM.SeedInit -> RandomC;
  RouteM.Random -> RandomC;

  RouteM.CommControl -> MAC;
  RouteM.CC2430Control -> HAL_CC2430ControlC;
  RouteM.SendData -> SendDataC;
  RouteM.RecvData -> RecvDataC;
  RouteM.SendBeacon -> SendBeaconC;
  RouteM.RecvBeacon -> RecvBeaconC;

  components SCSuartDBGC;
  RouteM.SCSuartDBG -> SCSuartDBGC;
}
